/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
#include "launchduino.h"

void setup() {
    // initialize the digital pin as input/output.
    // Pin P1.0 has an LED1(Red) connected on most LaunchPad boards:
    pinMode(0, OUTPUT);
    // Pin P1.6 has an LED2(Green) connected on most LaunchPad boards:
    pinMode(6, OUTPUT);
    // Pin P1.3 has an S2(Toggle SW) connected on most LaunchPad boards:
    pinMode(3, INPUT);
}

void loop() {
    if (HIGH == digitalRead(3)) {
        digitalWrite(0, LOW);
        digitalWrite(6, HIGH);
    } else {
        digitalWrite(6, LOW);
        digitalWrite(0, HIGH);
    }
}
